/// <reference path="../../../jquery-2.1.0.js" />
/// <reference path="../../../jasime/jasmine.js" />
/// <reference path="../../../jasime/jasmine-jquery.js" />
/// <reference path="../../../angular.js" />
/// <reference path="../../../angular-mocks.js" />
/// <reference path="../../../angular-bootstrap.js" />
/// <reference path="../../../angular-resource.js" />
/// <reference path="../../../angular-mocks.js" />
/// <reference path="../../../ui-bootstrap-0.7.0.js" />
/// <reference path="../../../angular-cookies.js" /> 
/// <reference path="../../../toastr.js" />
/// <reference path="../../../ui.select2.js" />

/// <reference path="../../../ngRoute.js" />
/// <reference path="../../../geocoder.js" />
/// <reference path="../../../underscore.js" />
/// <reference path="../../../angular-underscore.js" />
/// <reference path="../../../datepicker.js" />

/// <reference path="../../../app/app.js" />
/// <reference path="../../../app/directives.js" />
/// <reference path="../../../app/filters.js" />
/// <reference path="../../../app/services.js" />
/// <reference path="../../../app/controllers.js" />

// test/unit/directives/directivesSpec.js
//
describe("loading Widgets Directives", function () {

    var $compile, $rootScope;
    var element, scope, attr;


    // this is a convenient function to use when unit testing directives;
    // you will find yourself doing this often
    function compileAndApply(template) {
        var compiled = $compile(template)(scope);
        scope.$apply();
        return compiled;
    }


    beforeEach(inject(function ($injector, $rootScope) {
        $compile = $injector.get('$compile');
        scope = $rootScope.$new();
        scope.loading = true;
    }));


    //describe('the linking function', function () {
    it('should not throw error ', function () {
        var template = '<div id="loadingWidget" class="row-fluid ui-corner-all" style="padding: 0 .7em;" loading-widget ><div class="loadingContent"><p><img alt="Loading  Content" src="images/ajax-loader.gif" /> Loading </p> </div> </div>';
        expect(function () {
            compileAndApply(template);
        }).not.toThrow();
        // expect(compiled.hidden).toBeFalsy();
    });

    it('should not be hidden ', function () {
        var template = '<div id="loadingWidget" class="row-fluid ui-corner-all" style="padding: 0 .7em;" loading-widget ><div class="loadingContent"><p><img alt="Loading  Content" src="images/ajax-loader.gif" /> Loading </p> </div> </div>';
         compiled =  compileAndApply(template);
         expect(compiled.hidden).toBeFalsy();
    });



    });
//});